<ion-view view-title="我要代理">
	<!--通过副标题来定位-->
	<div class="bar bar-subheader bar-toper">
		<!--描述：顶部模块-->
		<div class="row classify">
			<div class="col col-50" on-tap="activeTab(0)" ng-class="selectTab==0?'top-activated':''">
				已发布的代理
			</div>
			<div class="col col-50" on-tap="activeTab(1)" ng-class="selectTab==1?'top-activated':''">
				发布代理
			</div>
		</div>
	</div>

	<!--描述：滑动块-->
	<ion-content scroll="true" class="scroll-padding">
		<ion-refresher ng-if="selectTab==0" pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
		<ion-slide-box delegate-handle="tab-handle" on-touch="onTouch()" on-release="onRelease()" draw-slide="false" on-slide-changed="slideChanged(index)" active-slide="slideIndex" show-pager="false">
			<ion-slide>
				<div class="font-large-my font-gray-my text-center padding" ng-if="list.beagenter.length==0||list.beagenter==null">
					<i class="icon ion-sad-outline font-1rem-my"></i> 对不起，没有已发布的代理.....
				</div>
				<div class="list padding-0 list-borderless" ng-repeat="beagenter in list.beagenter">
					<div class="item padding">
						<p>品类：{{beagenter.cat_type_name}}</p>
						<p>经销区域：{{beagenter.region_name}}</p>
						<p>发布日期：{{beagenter.apply_time}}</p>
						<p>
							预投入金额：{{beagenter.capital|currency:'¥'}}
							<a href="tel:{{beagenter.phone}}"><span class="right-zhang font-middle-my"><i class="icon ion-ios-telephone-outline positive font-large-my"></i>{{beagenter.phone}}</span></a>
						</p>
						<p>
							<span on-tap="findById_edit(beagenter.info_id)" ng-if="beagenter.status=='待审核'" class="margin-right-10-my"><i class="icon ion-compose positive"></i>&nbsp;编辑</span>
							<span on-tap="delete(beagenter.info_id,$index)"><i class="icon ion-ios-close-outline assertive"></i>&nbsp;删除</span>
							<span class="right-zhang assertive font-middle-my" ng-class="{'balanced':beagenter.status=='审核通过','energized':beagenter.status=='待审核'}">{{beagenter.status}}</span>
						</p>
					</div>
				</div>
			</ion-slide>

			<ion-slide>
				<div class="list padding-0">
						<li class="item item-input">
								品类：
								<div class="input-value small" ng-click="doSelectCat1()">{{input.cat1.name}}</div>
								<div class="input-value small" ng-click="doSelectCat2()">{{input.cat2.name}}</div>
								<div class="input-value small" ng-click="doSelectCat3()">{{input.cat3.name}}</div>	
						</li>
						<li class="item item-input">
								经销区域：
								<div class="input-value small" ng-click="doSelectProvince()">{{input.province.name}}</div>
								<div class="input-value small" ng-click="doSelectCity()">{{input.city.name}}</div>
								<div class="input-value small" ng-click="doSelectDistrict()">{{input.district.name}}</div>
						</li>
					<li class="item item-input">
						<span class="input-label">联系方式：</span>
						<input type="number" ng-model="input.phone" placeholder="请输入联系方式" ng-model="input.phone" />
					</li>
					<li class="item item-input">
						<span class="input-label">投入资金：</span>
						<input type="number"  ng-model="input.capital" placeholder="请输入投入资金" ng-model="input.capital" />
					</li>
					<li class="item item-input">
						<span class="input-label">代理描述：</span>
						<textarea rows="5" ng-model="input.reason" placeholder="请输入代理描述" style="padding-right:20px;" ng-model="input.reason"></textarea>
					</li>
				</div>

				<div class="padding">
					<button class="button button-block button-shop" on-tap="add()">发布</button>
				</div>
			</ion-slide>
		</ion-slide-box>
		<ion-infinite-scroll ng-if="!isLoad&&selectTab==0" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
	</ion-content>
</ion-view>